home *** CD-ROM | disk | FTP | other *** search
- /* Tutorial LC Demonstration Program */
- /* ©FaceWare 1993. All Rights Reserved. */
-
- #include <string.h>
- #include "FaceStorLC.h"
- extern struct FaceRec fRec;
-
- short theFlag,theListItem,theMenuItem;
- char theString[32];
-
- void main()
- {
- strcpy(fRec.uName, "Tutorial.Rsrc");
- FaceIt(0L,DoInit,0L,0L,0L,0L);
- theFlag = 0;
- theListItem = 3;
- theMenuItem = 2;
- strcpy(theString,"Hello");
- for (;;) {
- FaceIt(0L,DoLoop,0L,0L,0L,0L);
- if ((fRec.uMenuID == 105)&&(fRec.uMenuItem == 1))
- {
- FaceIt(0L,NewWnd,1010L,0L,0L,0L);
- FaceIt(0L,GetCtl,1010L,0L,1L,3L);
- FaceIt(0L,LnkCtl,(long)fRec.cControl,(long)&theFlag,2L,0L);
- FaceIt(0L,GetCtl,1010L,0L,1L,4L);
- FaceIt(0L,LnkCtl,(long)fRec.cControl,(long)theString,-31L,0L);
- FaceIt(0L,GetCtl,1010L,0L,1L,5L);
- FaceIt(0L,LnkCtl,(long)fRec.cControl,(long)&theListItem,2L,0L);
- FaceIt(0L,GetCtl,1010L,0L,1L,6L);
- FaceIt(0L,LnkCtl,(long)fRec.cControl,(long)&theMenuItem,2L,0L);
- FaceIt(0L,SetVal,1010L,0L,0L,0L);
- for (;;) {
- FaceIt(0L,MdlWnd,1010L,0L,0L,0L);
- if (fRec.uMenuID == 1010) {
- if (fRec.wcHit == -1)
- break;
- else if (fRec.wcHit == 1) {
- FaceIt(0L,GetVal,1010L,0L,0L,0L);
- break;
- }
- else if (fRec.wcHit == 2) {
- FaceIt(0L,GetCtl,1010L,0L,1L,8L);
- strcpy(fRec.uString,"Run button was hit.");
- FaceIt(fRec.cControl,1565L,2L,0L,0L,0L);
- }
- }
- }
- FaceIt(0L,EndWnd,1010L,0L,0L,0L);
- }
- }
- }